home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 1.iso
/
toolbox
/
src
/
demos
/
OpenGL
/
README
< prev
Wrap
Text File
|
1996-11-11
|
16KB
|
436 lines
toolbox/src/demos/OpenGL README
The executables in this opengl subtree were built
on an IRIX 6.2 software platform.
For other OpenGL "haunts", See Also:
* OpenGL: FROM THE EXTENSIONS TO THE SOLUTIONS Training Course materials
* OpenGL documentation tree
* OpenGL example source code tree
* OpenGL 1 & 2 classes source trees
This subtree contains OpenGL (some new/some old) demo source
for atlantis, backtrace, drip, fadeflip, fontflip, globe, glutduck, ideas,
insect lorenz, puzzle, space, stonehenge, tex_cube, and walker.
Eight demos use libglut.a from Mark Kilgard's OpenGL Utility Toolkit, (GLUT):
* atlantis
* globe
* glutduck
* ideas
* lorenz
* puzzle
* stonehenge
* walker
A pre-built libglut.a library is included in the lib directory.
This library is built from the source living in
../../exampleCode/opengl/GLUT/lib/glut/, release 3.1 of the OpenGL
Utility Toolkit resident on the Toolbox.
Five demos use the OpenGL Motif Widget, libGLw.a:
* backtrace
* drip
* fadeflip
* fontflip
* stonehenge
One demo uses the OpenGL Character Renderer, libGLC.a:
* fontflip
One "hold-out" still uses libtk, a library supplying simple windowing, event
handling, and more using only Xlib:
* insect
NOTE: The OpenGL people in engineering are attempting to move
beyond libtk, and, in the longer run, libaux. Mark Kilgard's
libglut is a much more "current generation" toolkit offerring many
useful features for those who are not already "X gods".
ALL use the GL and GLU OpenGL libraries except for space (which only uses GL):
* atlantis
* backtrace
* drip
* fadeflip
* fontflip
* globe
* glutduck
* ideas
* insect
* lorenz
* puzzle
* stonehenge
* tex_cube
* walker
-------------------------------------------------------------------------------
* atlantis: sharks, whales, and dolphins living side-by-side in harmony
* visit the atlantis directory
To Run:
% atlantis [-dr] [-ir] [-f file.rgb]
-dr run in direct render mode (rendering goes
directly to the hardware)
-ir run in indirect render mode (rendering goes
through the X server)
-f file.rgb by specifying a .rgb file, atlantis will use
the image to simulate the water reflection
off the fishes
mouse buttons pressed while mouse held stationary:
LEFTMOUSE - translate "to the left and up"
MIDDLEMOUSE - rotate "to the right and down"
RIGHTMOUSE - translate away from the eyepoint
r/R KEY - reset view as when window first came up
ESC - exit program
Demonstrates:
Lighting, animation capabilities, texture-mapping.
* backtrace: Simulates caustics like those produced by reverse ray tracing
* visit the backtrace directory
To Run:
% backtrace
RIGHTMOUSE - rotates around the z axis
MIDDLEMOUSE - changes radius
LEFTMOUSE - changes phi (azimuth)
ESC - exit program
To select a light, click (any MOUSEBUTTON) on it.
For a non-interactive demo, select "Rotate Automatically"
under the "Motion" menu.
Comments:
Should run pretty quickly on most systems as long as the
texture mapping is turned off.
* drip: Makes little droplets of color.
* visit the drip directory
To Run:
% drip [-r[number]] [-f] [-w]
every new MOUSEBUTTON press makes another expanding drop
LEFTMOUSE - make expanding red drops
MIDDLEMOUSE - make expanding green drops
RIGHTMOUSE - make expanding blue drops
ESC - exit program
-r - makes random drops for non-interactive demo.
Without the -r option, pressing
LEFT/MIDDLE/RIGHT -MOUSE buttons makes
drops of color.
-f - run in fullscreen mode
-w - set the background to WHITE
Demonstrates:
2D graphics
Blending functions.
Comments:
Not too involved or flashy, but should run quickly.
* fadeflip: Flips a texture-mapped square around
* visit the fadeflip directory
To Run:
% fadeflip [file1.rgb] [file2.rgb] [file3.rgb] [...]
RIGHTMOUSE - spin the object,
release while dragging to give momentum.
Without filenames, uses defaults. Files must be square.
If it complains it can't find the files, you may have
to give it full pathnames.
Demonstrates:
Texture mapping.
Comments:
Another small and mildly amusing demo
* fontflip: demonstrates some of the capabilities of the GLC library.
* visit the fontflip directory
A string and its bounding box is drawn and can be manipulated in the
following ways:
1. The left mouse button translates the origin.
2. The middle mouse button controls X and Y rotation.
3. The right mouse button controls Z rotation.
4. The '+' and '-' keys increase and decrease the scale factor,
respectively.
5. The View menu allows the position and rotation to be reset, and
switches between perspective and orthographic viewports.
6. The Render Style menu allows you to switch between bitmap,
polygon, and outline rendering.
7. The Family menu allows you to select a different font family.
* globe: Texture-mapped 3D globe, rendered w/Open Inventor
* visit the globe directory
To Run:
% globe
LEFTMOUSE - stops program animation sequence
RIGHTMOUSE- pop-up menu does "Step" (one frame-at-
a-time) and "Toggle Spinning"
* glutduck: Draw duck pond-swimming, rendered w/Open Inventor
* visit the glutduck directory
To Run:
% glutduck
LEFTMOUSE - stops program animation sequence
RIGHTMOUSE- pop-up menu does "Step" (one frame-at-
a-time) and "Toggle Spinning"
SPACEBAR - press-release: single-step
press-hold down: continuous animation
Comments:
Based on an example from The Inventor Mentor,
chapter 13, example 5.
* ideas: Ideas in Motion, an experiment in real-time animation.
* visit the ideas directory
To Run:
% ideas -a
LEFTMOUSE - restarts program animation sequence
SPACEBAR - pause/unpause toggle
-a run program continuously
Comments:
Should look good on almost any platform.
Demonstrates:
Stippling, lighting, animation capabilities.
* insect: Straight-ahead OpenGL port of thant-gaud's inspiration.
* visit the insect directory
To Run:
% insect
LEFTMOUSE - pan left or right depending on "x-location"
of cursor (ie, left of window center, pan
left)
MIDDLEMOUSE - pan up or down depdning upon "y-location".
- both of the above move faster the further
away the mouse is from the window center.
f/F - toggle's movement of the eye
ESC - exit program
Demonstrates:
Lighting, Colormap (includin 8-bit machines), display
lists, (hierarchically-defined insect model) animation
capabilities.
* lorenz: Ride on/near particles caught in a Lorenz attractor.
* visit the lorenz directory
To Run:
% lorenz [-h] [-i] [-x] [-s speed] [-w rot_v] [-g gravity]
-h Print this message.
-i Print information about the demo.
-x Enclose the particles in box made of hexagons
-s speed Sets the number of new line segments per
redraw interval per line. Default value: 3
-w rot_v Spins the hexagons on their centers, box sides
on their centers. Hexagons spin at rate rot_v
degrees per redraw, box sides spin at -rot_v/2
degrees per redraw.
-g gravity Sets the strength of the attraction of the eye
to the red particle. Actually, it's not
gravity since the attraction is proportionate
to distance.
Default value: 0.002. Try large values!
Executions control:
step through single frames
g begin continuous frames
s stop continuous frames
Comments:
shows particles stuck in a Lorenz attractor (parameters
used are r=28, b=8/3, sigma=10). The eye is attracted to
the red particle, with a force directly proportional to
distance. A command line argument puts the particles
inside a box made of hexagons, helping to maintain the
sense of 3 dimensions, but it can slow things down. Other
options allow you to play with the redraw rate and
gravity.
For general info on Lorenz attractors see "An Introduction
to the Lorenz Equations", IEEE Transactions on Circuits
and Systems, August '83.
BUGS: hidden surface removal doesn't apply to hexagons,
and works poorly on lines when they are too close
together.
NOTES ON OPENGL PORT:
The timer functions do not exist in OpenGL, so the
drawing occurs in a continuous loop, controlled by
step, stop and go input from the keyboard.
(Perhaps system function could be called to
control timing.)
* puzzle: Move pieces in the proper order to solve the puzzle
* visit the puzzle directory
To Run:
% puzzle
r Reset puzzle
s Solve puzzle (may take a few seconds to compute)
d Destroy a piece - makes the puzzle easier
b Toggles the depth buffer on and off
RIGHTMOUSE spins the puzzle
LEFTMOUSE moves pieces
ESC exit program
* space: Simulation of the Solar System and the Milky Way galaxy.
* visit the space directory
When approaching vicinity of planets or moons actual
texture-map surfaces or polygons of the spheres are
able to be made visible.
This demo will run on all current SGI architectures.
On non-realtime texturing architectures, entering into
single-buffer mode will enable non-real time options
with texturing.
questions or comments, please contact Erik Lindholm:
erilk@sgi.com or 415/390-1513.
MOUSE CONTROLS
left : accelerates
middle : brakes
right : pan/rotate toggle
left+right : face nearest moon
middle+right : face nearest planet
left+middle : face nearest star
KEY CONTROLS
Esc : quit
Shift : defeat mouse controls (for menu)
Ctrl : disconnect view vector from velocity vector
a : autopilot
b : single buffer mode (< 24bits) (trigger: LEFTMOUSE)
h : on screen help toggle
i : moons/orbits toggle
l : reshade polyplanet every frame
n : star name toggle
o : planets/orbits toggle
q : control panel toggle
r : decelerates time by 10
s : stellar system statistics
t : accelerates time by 10
u : user entry mode (use with system statistics)
v : reverse velocity
x : text display toggle
y : time reset
z : display constellation boundaries
- : time direction toggle
up arrow : increase tesselation level (max: 5)
down arrow : decrease tesselation level (min: 0)
PrintScrn : snap rgb image and quit
TEXT COLOR CODES
red : in interplanetary space
blue : in interstellar space
yellow: in intergalactic space
green : currently being eclipsed
TOURIST SPOTS
Sol: 0
Sirius: 728
Altair(C): 2255
* stonehenge: Stonehenge with shadows, textures and atmospheric effects.
* visit the stonehenge directory
To Run:
% stonehenge
on Reality Engines, turn on texture mapping under
"SPFX" menu.
Try Turning on "Scale = 1:500" under the "Time" menu
- if it's too jerky turn it off again.
May want to set weather.
The telescope option under the "SPFX" menu gives a little
telescope which can be moved around using the mouse.
For a non-interactive demo, select "Demo Mode" under the
"Misc" menu.
ESC exit program
Mouse interface:
Make sure Demo Mode is turned off.
LEFTMOUSE - turn
MIDDLEMOUSE - horizontal motion changed speed:
left to right = forward
right to left = backward
RIGHTMOUSE - stop motion
Comments:
May have a couple of bugs.
* tex_cube: Small texture-mapping demo of a translucent cube.
* visit the tex_cube directory
To Run:
% tex_cube [name_of_square_rgb_file]
Uses a default image if no filename is specified
Drag with mouse to rotate
every new MOUSEBUTTON press makes another expanding drop
ESC - exit program
h/H - halt movement/rotation of cube
w/W - reset to initial position
SPACEBAR - pause rotation movement toggle
* walker: Simple forward kinetics animation system.
* visit the walker directory
To Run:
% glutduck
LEFTMOUSE - in Main window: stops prog animation
Rotation Curves window: move animation
thru curve plots
RIGHTMOUSE- pop-up menu does
Viewing -> Flying Move
Polar Move
Model-> Wire Cubes
Solid Cubes
Cylinder 1
Cylinder 2
Toggle Axes
Toggle Perspective View
Quit
SPACEBAR - press-release: single-step
press-hold down: continuous animation
Comments:
Although the model only has a few degrees of freedom,
various sequences (running, jumping, dunking...) are
implemented.
----------------------------------------------------------------------------
Copyright ⌐ 1995, Silicon Graphics, Inc.